<!doctype html>

<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>daterange.js (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>

<div class="clear"></div>

<h2><a href="closure_goog_date_daterange.js.html">daterange.js</a></h2>

<pre class="prettyprint lang-js">
<a name="line1"></a>// Copyright 2008 The Closure Library Authors. All Rights Reserved.
<a name="line2"></a>//
<a name="line3"></a>// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
<a name="line4"></a>// you may not use this file except in compliance with the License.
<a name="line5"></a>// You may obtain a copy of the License at
<a name="line6"></a>//
<a name="line7"></a>//      http://www.apache.org/licenses/LICENSE-2.0
<a name="line8"></a>//
<a name="line9"></a>// Unless required by applicable law or agreed to in writing, software
<a name="line10"></a>// distributed under the License is distributed on an &quot;AS-IS&quot; BASIS,
<a name="line11"></a>// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<a name="line12"></a>// See the License for the specific language governing permissions and
<a name="line13"></a>// limitations under the License.
<a name="line14"></a>
<a name="line15"></a>/**
<a name="line16"></a> * @fileoverview Date range data structure. Based loosely on
<a name="line17"></a> * com.google.common.util.DateRange.
<a name="line18"></a> *
<a name="line19"></a> */
<a name="line20"></a>
<a name="line21"></a>goog.provide(&#39;goog.date.DateRange&#39;);
<a name="line22"></a>goog.provide(&#39;goog.date.DateRange.Iterator&#39;);
<a name="line23"></a>goog.provide(&#39;goog.date.DateRange.StandardDateRangeKeys&#39;);
<a name="line24"></a>
<a name="line25"></a>goog.require(&#39;goog.date.Date&#39;);
<a name="line26"></a>goog.require(&#39;goog.date.Interval&#39;);
<a name="line27"></a>goog.require(&#39;goog.iter.Iterator&#39;);
<a name="line28"></a>goog.require(&#39;goog.iter.StopIteration&#39;);
<a name="line29"></a>
<a name="line30"></a>
<a name="line31"></a>
<a name="line32"></a>/**
<a name="line33"></a> * Constructs a date range.
<a name="line34"></a> * @constructor
<a name="line35"></a> * @param {goog.date.Date} startDate The first date in the range.
<a name="line36"></a> * @param {goog.date.Date} endDate The last date in the range.
<a name="line37"></a> */
<a name="line38"></a>goog.date.DateRange = function(startDate, endDate) {
<a name="line39"></a>  /**
<a name="line40"></a>   * The first date in the range.
<a name="line41"></a>   * @type {goog.date.Date}
<a name="line42"></a>   * @private
<a name="line43"></a>   */
<a name="line44"></a>  this.startDate_ = startDate;
<a name="line45"></a>
<a name="line46"></a>  /**
<a name="line47"></a>   * The last date in the range.
<a name="line48"></a>   * @type {goog.date.Date}
<a name="line49"></a>   * @private
<a name="line50"></a>   */
<a name="line51"></a>  this.endDate_ = endDate;
<a name="line52"></a>};
<a name="line53"></a>
<a name="line54"></a>
<a name="line55"></a>/**
<a name="line56"></a> * The first possible day, as far as this class is concerned.
<a name="line57"></a> * @type {goog.date.Date}
<a name="line58"></a> */
<a name="line59"></a>goog.date.DateRange.MINIMUM_DATE = new goog.date.Date(0000, 0, 1);
<a name="line60"></a>
<a name="line61"></a>
<a name="line62"></a>/**
<a name="line63"></a> * The last possible day, as far as this class is concerned.
<a name="line64"></a> * @type {goog.date.Date}
<a name="line65"></a> */
<a name="line66"></a>goog.date.DateRange.MAXIMUM_DATE = new goog.date.Date(9999, 11, 31);
<a name="line67"></a>
<a name="line68"></a>
<a name="line69"></a>/**
<a name="line70"></a> * @return {goog.date.Date} The first date in the range.
<a name="line71"></a> */
<a name="line72"></a>goog.date.DateRange.prototype.getStartDate = function() {
<a name="line73"></a>  return this.startDate_;
<a name="line74"></a>};
<a name="line75"></a>
<a name="line76"></a>
<a name="line77"></a>/**
<a name="line78"></a> * @return {goog.date.Date} The last date in the range.
<a name="line79"></a> */
<a name="line80"></a>goog.date.DateRange.prototype.getEndDate = function() {
<a name="line81"></a>  return this.endDate_;
<a name="line82"></a>};
<a name="line83"></a>
<a name="line84"></a>
<a name="line85"></a>/**
<a name="line86"></a> * @return {goog.iter.Iterator} An iterator over the date range.
<a name="line87"></a> */
<a name="line88"></a>goog.date.DateRange.prototype.iterator = function() {
<a name="line89"></a>  return new goog.date.DateRange.Iterator(this);
<a name="line90"></a>};
<a name="line91"></a>
<a name="line92"></a>
<a name="line93"></a>/**
<a name="line94"></a> * Tests two {@link goog.date.DateRange} objects for equality.
<a name="line95"></a> * @param {goog.date.DateRange} a A date range.
<a name="line96"></a> * @param {goog.date.DateRange} b A date range.
<a name="line97"></a> * @return {boolean} Whether |a| is the same range as |b|.
<a name="line98"></a> */
<a name="line99"></a>goog.date.DateRange.equals = function(a, b) {
<a name="line100"></a>  // Test for same object reference; type conversion is irrelevant.
<a name="line101"></a>  if (a === b) {
<a name="line102"></a>    return true;
<a name="line103"></a>  }
<a name="line104"></a>
<a name="line105"></a>  if (a == null || b == null) {
<a name="line106"></a>    return false;
<a name="line107"></a>  }
<a name="line108"></a>
<a name="line109"></a>  return a.startDate_.equals(b.startDate_) &amp;&amp; a.endDate_.equals(b.endDate_);
<a name="line110"></a>};
<a name="line111"></a>
<a name="line112"></a>
<a name="line113"></a>/**
<a name="line114"></a> * Calculates a date that is a number of days after a date. Does not modify its
<a name="line115"></a> * input.
<a name="line116"></a> * @param {goog.date.Date} date The input date.
<a name="line117"></a> * @param {number} offset Number of days.
<a name="line118"></a> * @return {goog.date.Date} The date that is |offset| days after |date|.
<a name="line119"></a> * @private
<a name="line120"></a> */
<a name="line121"></a>goog.date.DateRange.offsetInDays_ = function(date, offset) {
<a name="line122"></a>  var newDate = date.clone();
<a name="line123"></a>  newDate.add(new goog.date.Interval(goog.date.Interval.DAYS, offset));
<a name="line124"></a>  return newDate;
<a name="line125"></a>};
<a name="line126"></a>
<a name="line127"></a>
<a name="line128"></a>/**
<a name="line129"></a> * Calculates the Monday before a date. If the input is a Monday, returns the
<a name="line130"></a> * input. Does not modify its input.
<a name="line131"></a> * @param {goog.date.Date} date The input date.
<a name="line132"></a> * @return {goog.date.Date} If |date| is a Monday, return |date|; otherwise
<a name="line133"></a> *     return the Monday before |date|.
<a name="line134"></a> * @private
<a name="line135"></a> */
<a name="line136"></a>goog.date.DateRange.currentOrLastMonday_ = function(date) {
<a name="line137"></a>  var newDate = date.clone();
<a name="line138"></a>  newDate.add(new goog.date.Interval(goog.date.Interval.DAYS,
<a name="line139"></a>      -newDate.getIsoWeekday()));
<a name="line140"></a>  return newDate;
<a name="line141"></a>};
<a name="line142"></a>
<a name="line143"></a>
<a name="line144"></a>/**
<a name="line145"></a> * Calculates a date that is a number of months after the first day in the
<a name="line146"></a> * month that contains its input. Does not modify its input.
<a name="line147"></a> * @param {goog.date.Date} date The input date.
<a name="line148"></a> * @param {number} offset Number of months.
<a name="line149"></a> * @return {goog.date.Date} The date that is |offset| months after the first
<a name="line150"></a> *     day in the month that contains |date|.
<a name="line151"></a> * @private
<a name="line152"></a> */
<a name="line153"></a>goog.date.DateRange.offsetInMonths_ = function(date, offset) {
<a name="line154"></a>  var newDate = date.clone();
<a name="line155"></a>  newDate.setDate(1);
<a name="line156"></a>  newDate.add(new goog.date.Interval(goog.date.Interval.MONTHS, offset));
<a name="line157"></a>  return newDate;
<a name="line158"></a>};
<a name="line159"></a>
<a name="line160"></a>
<a name="line161"></a>/**
<a name="line162"></a> * Returns the range from yesterday to yesterday.
<a name="line163"></a> * @param {goog.date.Date=} opt_today The date to consider today.
<a name="line164"></a> *     Defaults to today.
<a name="line165"></a> * @return {goog.date.DateRange} The range that includes only yesterday.
<a name="line166"></a> */
<a name="line167"></a>goog.date.DateRange.yesterday = function(opt_today) {
<a name="line168"></a>  var today = goog.date.DateRange.cloneOrCreate_(opt_today);
<a name="line169"></a>  var yesterday = goog.date.DateRange.offsetInDays_(today, -1);
<a name="line170"></a>  return new goog.date.DateRange(yesterday, yesterday);
<a name="line171"></a>};
<a name="line172"></a>
<a name="line173"></a>
<a name="line174"></a>/**
<a name="line175"></a> * Returns the range from today to today.
<a name="line176"></a> * @param {goog.date.Date=} opt_today The date to consider today.
<a name="line177"></a> *     Defaults to today.
<a name="line178"></a> * @return {goog.date.DateRange} The range that includes only today.
<a name="line179"></a> */
<a name="line180"></a>goog.date.DateRange.today = function(opt_today) {
<a name="line181"></a>  var today = goog.date.DateRange.cloneOrCreate_(opt_today);
<a name="line182"></a>  return new goog.date.DateRange(today, today);
<a name="line183"></a>};
<a name="line184"></a>
<a name="line185"></a>
<a name="line186"></a>/**
<a name="line187"></a> * Returns the range that includes the seven days that end yesterday.
<a name="line188"></a> * @param {goog.date.Date=} opt_today The date to consider today.
<a name="line189"></a> *     Defaults to today.
<a name="line190"></a> * @return {goog.date.DateRange} The range that includes the seven days that
<a name="line191"></a> *     end yesterday.
<a name="line192"></a> */
<a name="line193"></a>goog.date.DateRange.last7Days = function(opt_today) {
<a name="line194"></a>  var today = goog.date.DateRange.cloneOrCreate_(opt_today);
<a name="line195"></a>  var yesterday = goog.date.DateRange.offsetInDays_(today, -1);
<a name="line196"></a>  return new goog.date.DateRange(goog.date.DateRange.offsetInDays_(today, -7),
<a name="line197"></a>      yesterday);
<a name="line198"></a>};
<a name="line199"></a>
<a name="line200"></a>
<a name="line201"></a>/**
<a name="line202"></a> * Returns the range that starts the first of this month and ends the last day
<a name="line203"></a> * of this month.
<a name="line204"></a> * @param {goog.date.Date=} opt_today The date to consider today.
<a name="line205"></a> *     Defaults to today.
<a name="line206"></a> * @return {goog.date.DateRange} The range that starts the first of this month
<a name="line207"></a> *     and ends the last day of this month.
<a name="line208"></a> */
<a name="line209"></a>goog.date.DateRange.thisMonth = function(opt_today) {
<a name="line210"></a>  var today = goog.date.DateRange.cloneOrCreate_(opt_today);
<a name="line211"></a>  return new goog.date.DateRange(
<a name="line212"></a>      goog.date.DateRange.offsetInMonths_(today, 0),
<a name="line213"></a>      goog.date.DateRange.offsetInDays_(
<a name="line214"></a>          goog.date.DateRange.offsetInMonths_(today, 1),
<a name="line215"></a>          -1));
<a name="line216"></a>};
<a name="line217"></a>
<a name="line218"></a>
<a name="line219"></a>/**
<a name="line220"></a> * Returns the range that starts the first of last month and ends the last day
<a name="line221"></a> * of last month.
<a name="line222"></a> * @param {goog.date.Date=} opt_today The date to consider today.
<a name="line223"></a> *     Defaults to today.
<a name="line224"></a> * @return {goog.date.DateRange} The range that starts the first of last month
<a name="line225"></a> *     and ends the last day of last month.
<a name="line226"></a> */
<a name="line227"></a>goog.date.DateRange.lastMonth = function(opt_today) {
<a name="line228"></a>  var today = goog.date.DateRange.cloneOrCreate_(opt_today);
<a name="line229"></a>  return new goog.date.DateRange(
<a name="line230"></a>      goog.date.DateRange.offsetInMonths_(today, -1),
<a name="line231"></a>      goog.date.DateRange.offsetInDays_(
<a name="line232"></a>          goog.date.DateRange.offsetInMonths_(today, 0),
<a name="line233"></a>          -1));
<a name="line234"></a>};
<a name="line235"></a>
<a name="line236"></a>
<a name="line237"></a>/**
<a name="line238"></a> * Returns the seven-day range that starts on the first day of the week
<a name="line239"></a> * (see {@link goog.i18n.DateTimeSymbols.FIRSTDAYOFWEEK}) on or before today.
<a name="line240"></a> * @param {goog.date.Date=} opt_today The date to consider today.
<a name="line241"></a> *     Defaults to today.
<a name="line242"></a> * @return {goog.date.DateRange} The range that starts the Monday on or before
<a name="line243"></a> *     today and ends the Sunday on or after today.
<a name="line244"></a> */
<a name="line245"></a>goog.date.DateRange.thisWeek = function(opt_today) {
<a name="line246"></a>  var today = goog.date.DateRange.cloneOrCreate_(opt_today);
<a name="line247"></a>  var iso = today.getIsoWeekday();
<a name="line248"></a>  var firstDay = today.getFirstDayOfWeek();
<a name="line249"></a>  var i18nFirstDay = (iso &gt;= firstDay) ? iso - firstDay : iso + (7 - firstDay);
<a name="line250"></a>  var start = goog.date.DateRange.offsetInDays_(today, -i18nFirstDay);
<a name="line251"></a>  var end = goog.date.DateRange.offsetInDays_(start, 6);
<a name="line252"></a>  return new goog.date.DateRange(start, end);
<a name="line253"></a>};
<a name="line254"></a>
<a name="line255"></a>
<a name="line256"></a>/**
<a name="line257"></a> * Returns the seven-day range that ends the day before the first day of
<a name="line258"></a> * the week (see {@link goog.i18n.DateTimeSymbols.FIRSTDAYOFWEEK}) that
<a name="line259"></a> * contains today.
<a name="line260"></a> * @param {goog.date.Date=} opt_today The date to consider today.
<a name="line261"></a> *     Defaults to today.
<a name="line262"></a> * @return {goog.date.DateRange} The range that starts seven days before the
<a name="line263"></a> *     Monday on or before today and ends the Sunday on or before yesterday.
<a name="line264"></a> */
<a name="line265"></a>goog.date.DateRange.lastWeek = function(opt_today) {
<a name="line266"></a>  var thisWeek = goog.date.DateRange.thisWeek(opt_today);
<a name="line267"></a>  var start = goog.date.DateRange.offsetInDays_(thisWeek.getStartDate(), -7);
<a name="line268"></a>  var end = goog.date.DateRange.offsetInDays_(thisWeek.getEndDate(), -7);
<a name="line269"></a>  return new goog.date.DateRange(start, end);
<a name="line270"></a>};
<a name="line271"></a>
<a name="line272"></a>
<a name="line273"></a>/**
<a name="line274"></a> * Returns the range that starts seven days before the Monday on or before
<a name="line275"></a> * today and ends the Friday before today.
<a name="line276"></a> * @param {goog.date.Date=} opt_today The date to consider today.
<a name="line277"></a> *     Defaults to today.
<a name="line278"></a> * @return {goog.date.DateRange} The range that starts seven days before the
<a name="line279"></a> *     Monday on or before today and ends the Friday before today.
<a name="line280"></a> */
<a name="line281"></a>goog.date.DateRange.lastBusinessWeek = function(opt_today) {
<a name="line282"></a>  // TODO(user): should be i18nized.
<a name="line283"></a>  var today = goog.date.DateRange.cloneOrCreate_(opt_today);
<a name="line284"></a>  var start = goog.date.DateRange.offsetInDays_(today,
<a name="line285"></a>      - 7 - today.getIsoWeekday());
<a name="line286"></a>  var end = goog.date.DateRange.offsetInDays_(start, 4);
<a name="line287"></a>  return new goog.date.DateRange(start, end);
<a name="line288"></a>};
<a name="line289"></a>
<a name="line290"></a>
<a name="line291"></a>/**
<a name="line292"></a> * Returns the range that includes all days between January 1, 1900 and
<a name="line293"></a> * December 31, 9999.
<a name="line294"></a> * @param {goog.date.Date=} opt_today The date to consider today.
<a name="line295"></a> *     Defaults to today.
<a name="line296"></a> * @return {goog.date.DateRange} The range that includes all days between
<a name="line297"></a> *     January 1, 1900 and December 31, 9999.
<a name="line298"></a> */
<a name="line299"></a>goog.date.DateRange.allTime = function(opt_today) {
<a name="line300"></a>  return new goog.date.DateRange(
<a name="line301"></a>      goog.date.DateRange.MINIMUM_DATE,
<a name="line302"></a>      goog.date.DateRange.MAXIMUM_DATE);
<a name="line303"></a>};
<a name="line304"></a>
<a name="line305"></a>
<a name="line306"></a>/**
<a name="line307"></a> * Standard date range keys. Equivalent to the enum IDs in
<a name="line308"></a> * DateRange.java http://go/datarange.java
<a name="line309"></a> *
<a name="line310"></a> * @enum {string}
<a name="line311"></a> */
<a name="line312"></a>goog.date.DateRange.StandardDateRangeKeys = {
<a name="line313"></a>  YESTERDAY: &#39;yesterday&#39;,
<a name="line314"></a>  TODAY: &#39;today&#39;,
<a name="line315"></a>  LAST_7_DAYS: &#39;last7days&#39;,
<a name="line316"></a>  THIS_MONTH: &#39;thismonth&#39;,
<a name="line317"></a>  LAST_MONTH: &#39;lastmonth&#39;,
<a name="line318"></a>  THIS_WEEK: &#39;thisweek&#39;,
<a name="line319"></a>  LAST_WEEK: &#39;lastweek&#39;,
<a name="line320"></a>  LAST_BUSINESS_WEEK: &#39;lastbusinessweek&#39;,
<a name="line321"></a>  ALL_TIME: &#39;alltime&#39;
<a name="line322"></a>};
<a name="line323"></a>
<a name="line324"></a>
<a name="line325"></a>/**
<a name="line326"></a> * @param {string} dateRangeKey A standard date range key.
<a name="line327"></a> * @param {goog.date.Date=} opt_today The date to consider today.
<a name="line328"></a> *     Defaults to today.
<a name="line329"></a> * @return {goog.date.DateRange} The date range that corresponds to that key.
<a name="line330"></a> * @throws {Error} If no standard date range with that key exists.
<a name="line331"></a> */
<a name="line332"></a>goog.date.DateRange.standardDateRange = function(dateRangeKey, opt_today) {
<a name="line333"></a>  switch (dateRangeKey) {
<a name="line334"></a>    case goog.date.DateRange.StandardDateRangeKeys.YESTERDAY:
<a name="line335"></a>      return goog.date.DateRange.yesterday(opt_today);
<a name="line336"></a>
<a name="line337"></a>    case goog.date.DateRange.StandardDateRangeKeys.TODAY:
<a name="line338"></a>      return goog.date.DateRange.today(opt_today);
<a name="line339"></a>
<a name="line340"></a>    case goog.date.DateRange.StandardDateRangeKeys.LAST_7_DAYS:
<a name="line341"></a>      return goog.date.DateRange.last7Days(opt_today);
<a name="line342"></a>
<a name="line343"></a>    case goog.date.DateRange.StandardDateRangeKeys.THIS_MONTH:
<a name="line344"></a>      return goog.date.DateRange.thisMonth(opt_today);
<a name="line345"></a>
<a name="line346"></a>    case goog.date.DateRange.StandardDateRangeKeys.LAST_MONTH:
<a name="line347"></a>      return goog.date.DateRange.lastMonth(opt_today);
<a name="line348"></a>
<a name="line349"></a>    case goog.date.DateRange.StandardDateRangeKeys.THIS_WEEK:
<a name="line350"></a>      return goog.date.DateRange.thisWeek(opt_today);
<a name="line351"></a>
<a name="line352"></a>    case goog.date.DateRange.StandardDateRangeKeys.LAST_WEEK:
<a name="line353"></a>      return goog.date.DateRange.lastWeek(opt_today);
<a name="line354"></a>
<a name="line355"></a>    case goog.date.DateRange.StandardDateRangeKeys.LAST_BUSINESS_WEEK:
<a name="line356"></a>      return goog.date.DateRange.lastBusinessWeek(opt_today);
<a name="line357"></a>
<a name="line358"></a>    case goog.date.DateRange.StandardDateRangeKeys.ALL_TIME:
<a name="line359"></a>      return goog.date.DateRange.allTime(opt_today);
<a name="line360"></a>
<a name="line361"></a>    default:
<a name="line362"></a>      throw Error(&#39;no such date range key: &#39; + dateRangeKey);
<a name="line363"></a>  }
<a name="line364"></a>};
<a name="line365"></a>
<a name="line366"></a>
<a name="line367"></a>/**
<a name="line368"></a> * Clones or creates new.
<a name="line369"></a> * @param {goog.date.Date=} opt_today The date to consider today.
<a name="line370"></a> *     Defaults to today.
<a name="line371"></a> * @return {!goog.date.Date} cloned or new.
<a name="line372"></a> * @private
<a name="line373"></a> */
<a name="line374"></a>goog.date.DateRange.cloneOrCreate_ = function(opt_today) {
<a name="line375"></a>  return opt_today ? opt_today.clone() : new goog.date.Date();
<a name="line376"></a>};
<a name="line377"></a>
<a name="line378"></a>
<a name="line379"></a>
<a name="line380"></a>/**
<a name="line381"></a> * Creates an iterator over the dates in a {@link goog.date.DateRange}.
<a name="line382"></a> * @constructor
<a name="line383"></a> * @extends {goog.iter.Iterator}
<a name="line384"></a> * @param {goog.date.DateRange} dateRange The date range to iterate.
<a name="line385"></a> */
<a name="line386"></a>goog.date.DateRange.Iterator = function(dateRange) {
<a name="line387"></a>  /**
<a name="line388"></a>   * The next date.
<a name="line389"></a>   * @type {goog.date.Date}
<a name="line390"></a>   * @private
<a name="line391"></a>   */
<a name="line392"></a>  this.nextDate_ = dateRange.getStartDate().clone();
<a name="line393"></a>
<a name="line394"></a>  /**
<a name="line395"></a>   * The end date, expressed as an integer: YYYYMMDD.
<a name="line396"></a>   * @type {number}
<a name="line397"></a>   * @private
<a name="line398"></a>   */
<a name="line399"></a>  this.endDate_ = Number(dateRange.getEndDate().toIsoString());
<a name="line400"></a>};
<a name="line401"></a>goog.inherits(goog.date.DateRange.Iterator, goog.iter.Iterator);
<a name="line402"></a>
<a name="line403"></a>
<a name="line404"></a>/** @override */
<a name="line405"></a>goog.date.DateRange.Iterator.prototype.next = function() {
<a name="line406"></a>  if (Number(this.nextDate_.toIsoString()) &gt; this.endDate_) {
<a name="line407"></a>    throw goog.iter.StopIteration;
<a name="line408"></a>  }
<a name="line409"></a>
<a name="line410"></a>  var rv = this.nextDate_.clone();
<a name="line411"></a>  this.nextDate_.add(new goog.date.Interval(goog.date.Interval.DAYS, 1));
<a name="line412"></a>  return rv;
<a name="line413"></a>};
</pre>


</body>
</html>
